package engine.newUi
{
	import engine.data.ResPath;
	import engine.ui.lite.BaseUI;
	
	import newx.com.control.NxClip;
	
	public class CampChooseUI extends BaseUI
	{
		public var line		:NxClip
		public var title_0		:NxClip
		public var title_1		:NxClip
		public var pic_0		:NxClip
		public var pic_1		:NxClip;
		
		private var _myLogic:CampChooseLogic;
		private static var _self:CampChooseUI;
		public function CampChooseUI(popupUI:Boolean=true)
		{
			super(popupUI);
		}
		public static function getInstance():CampChooseUI
		{
			if(_self == null)
			{
				_self	=	new CampChooseUI();
			}
			return _self;
		}
		override public function Init():void
		{
			_myLogic	=	CampChooseLogic.getInstance();
		}
		override protected function AfterHide():void
		{
			_myLogic.removeListener();
			
			if( title_0.source == null )
			{
				title_0.source	=	ResPath.PNG + "camp_t_0.png";
				title_1.source	=	ResPath.PNG + "camp_t_1.png";
				pic_0.source		=	ResPath.PNG + "camp_p_0.png";
				pic_1.source		=	ResPath.PNG + "camp_p_1.png";
				line.source		=	ResPath.PNG + "line.png";
			}
		}
		override protected function BeforeShow():void
		{
			_myLogic.addListener();
		}
		
	}
}